<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<p>原数据:{{msg}}</p>
			<p>翻转后的数据:{{reverseMsg}}</p>
		</div>
		<script>
			Vue.createApp({
				data(){
					return {
						msg: 'welcome study Vue3'
					}
				},
				computed:{
					//可计算属性
					reverseMsg(){
						return this.msg.split(' ').reverse().join('--');
					}
				}
			}).mount('#app')
		</script>
	</body>
</html>
